package org.monkey.common.cbs.entity.mo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 过滤条件类
 * 通过该过滤条件可以解析成各个框架的动态查询条件
 *
 * @author liting
 * @version 1.0
 * @date 2020/8/26
 * @see PageParam
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
public class FieldFilter {
    public static final String GT = "gt";
    public static final String LT = "lt";
    public static final String FULL_LIKE = "fullLike";
    public static final String LEFT_LIKE = "leftLike";
    public static final String RIGHT_LIKE = "rightLike";
    public static final String EQ = "eq";
    public static final String GTE = "gte";
    public static final String LTE = "lte";
    public static final String RG = "range";

    @ApiModelProperty(name = "range", value = "区间对象 过滤器类型为range时启用")
    private Range range;
    @ApiModelProperty(name = "filterType", value = "过滤类型 gt(大于) lt(小于) fullLike(模糊检索) eq(等于--默认) gte(大于等于) lte(小于等于)")
    private String filterType = EQ;
    @ApiModelProperty(name = "fieldName", value = "字段名")
    private String fieldName;
    @ApiModelProperty(name = "filedValue", value = "字段值")
    private Object filedValue;
}
